<template>
  <div class="header">
    <div class="header-left" @click="closeNormalPlayer"></div>
    <div class="header-title">
      <h3>{{currentSongs.name}}</h3>
      <p>{{currentSongs.singer}}</p>
    </div>
    <div class="header-right"></div>
  </div>
</template>

<script>
import { mapActions, mapGetters } from 'vuex'
export default {
  data () {
    return {

    }
  },
  methods: {
    ...mapActions(['setFullScreen', 'setMiniPlayer']),
    // 关闭播放页面
    closeNormalPlayer () {
      // 默认播放界面关闭
      this.setFullScreen(false)
      // 迷你播放器显示
      this.setMiniPlayer(true)
    }
  },
  computed: {
    ...mapGetters(['currentSongs'])
  }
}
</script>

<style lang="scss" scoped>
@import "@/assets/css/variable.scss";
@import "@/assets/css/mixin.scss";
.header {
  width: 100%;
  height: 100px;
  // 默认颜色 网易红
  // @include bg_color();
  display: flex;
  justify-content: space-between;
  // position: relative;
  // z-index: 9999;
  .header-left,
  .header-right {
    width: 84px;
    height: 84px;
    margin-top: 8px;
  }
  .header-left {
    // 图片换肤
    @include bg_img("../../assets/images/down");
  }
  .header-right {
    // 图片换肤
    @include bg_img("../../assets/images/more");
  }
  .header-title {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    color: #fff;
    // font-weight: bold;
    @include font_size($font_medium_s);
    @include no-wrap();
  }
}
</style>
